package com.xinqi.modules.exam.paper.convert;

import com.xinqi.common.mapstruct.CommonConvertConfig;
import com.xinqi.modules.exam.common.mapstruct.IgnoreEntity;
import com.xinqi.modules.exam.paper.domain.CourseExamPaperConfigEntity;
import com.xinqi.modules.exam.paper.dto.req.CourseExamPaperConfigCreateDTO;
import com.xinqi.modules.exam.paper.dto.req.CourseExamPaperConfigUpdateDTO;
import com.xinqi.modules.exam.paper.dto.rsp.CourseExamPaperConfigResultDTO;
import org.mapstruct.Mapper;
import org.mapstruct.MappingTarget;

/**
 * 课程测评配置转换
 *
 * @author: linkai
 * @date: 2023/07/02
 */
@Mapper(config = CommonConvertConfig.class)
public abstract class CourseExamPaperConfigConvert {
    public abstract CourseExamPaperConfigEntity create(CourseExamPaperConfigCreateDTO s);

    public abstract CourseExamPaperConfigEntity update(CourseExamPaperConfigUpdateDTO s, @MappingTarget CourseExamPaperConfigEntity t);

    public abstract CourseExamPaperConfigEntity update(CourseExamPaperConfigUpdateDTO s);

    public abstract CourseExamPaperConfigResultDTO convert(CourseExamPaperConfigEntity s);

    @IgnoreEntity
    public abstract CourseExamPaperConfigEntity copy(CourseExamPaperConfigEntity s);
}
